package chat

import (
	"context"
	"fmt"
	"net/http"
)

const (
	// 流式输出结束标识
	STREAM_DONE_FLAG = "[DONE]"
)

type IChat interface {
	Chat(ctx context.Context, resw http.ResponseWriter, args *ChatDoArgsV1,conf string) (*ChatDoResultV1, error)
}

// streamResponse 处理流式响应
func streamResponse(message string) []byte {
	return []byte(fmt.Sprintf("data:{\"ok\":true,\":true,\"body\": \"%s\"} \n\n", message))
}
